import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import zhCn from "element-plus/dist/locale/zh-cn.mjs";
import "@/styles/index.scss";
// 引入状态管理
import { setupStore } from "@/store";

import * as Icons from "@element-plus/icons-vue";

const setupAll = async () => {
  const app = createApp(App).use(router).use(ElementPlus, {
    locale: zhCn,
  });
  setupStore(app);
  for (let i in Icons) {
    app.component(i, Icons[i]);
  }
  app.mount("#app");
};
setupAll();
